# 更换源
local({
  r <- getOption("repos")
  r["CRAN"] <- "http://mirrors.tuna.tsinghua.edu.cn/CRAN/"
  options(repos=r)
})

# 安装包
if(!require(jiebaR)) install.packages('jiebaR')
if(!require(sqldf)) install.packages('sqldf')
if(!require(wordcloud2))install.packages('wordcloud2')
if(!require(rJava))install.packages("rJava", type='source')
if(!require(quantmod))install.packages("quantmod")
if(!require(zoo))install.packages("zoo")
if(!require(xts))install.packages("xts")
if(!require(TTR))install.packages("TTR")
